<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
  <script>
    var big=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"]
    // function change(num){
    //     numStr=String(num)
    //        for(var i=0;i<numStr.length;i++){
    //            console.log(numStr.charAt(i),big[numStr.charAt(i)-1])
    //           numStr=numStr.replace(numStr.charAt(i),big[numStr.charAt(i)-1]);
    //        }
    // //    console.log(numStr)
    //      num=numStr;
    //      return num
    // }
    var a="78123456";
    var str=""
    // console.log(change(a))
    for(var i=0;i<a.length;i++){
      var index=a.charAt(i)
      str += big[index]
    }
    console.log(str)

     
   
   
    var dw=["圆","拾","佰","仟","萬","拾萬","佰萬","仟","亿"];
//    function change1(str){
//       var str1=change(str)
//       var str1Arr=str1.split("")
//       console.log(str1Arr)
//     //    没有0的情况
//       var j=0;    
//       for(var i=(str1Arr.length)-1;i>=0;i--){
//           str1Arr[i]=str1Arr[i]+dw[j]
//           j++;
//       }
//       return str1Arr.join("");
//     }
//  console.log(change1(a))
        for(var i=0;i<str.length;i++){
          
        }
  </script>  
</body>
</html>